package com.ffzx.commerce.framework.common.persistence;

import java.util.Date;

import org.hibernate.validator.constraints.Length;

import com.ffzx.commerce.framework.annotation.Comment;
import com.ffzx.commerce.framework.system.entity.SysUser;

/**
 * 基础数据对象
 * 
 * @author zhugj
 * @date 2016年3月1日 下午2:03:29
 * @version 0.1.0
 */
public abstract class DataEntity<T> extends BaseEntity<T> {

    private static final long serialVersionUID = 1L;
	
    /**
     * 备注
     */
    @Length(min=0, max=255)
    @Comment("备注")
	protected String remarks;
	
    /**
     * 创建者
     */
    @Comment("创建者")
	protected SysUser createBy;
	
	/**
	 * 创建日期
	 */
    @Comment("创建日期")
	protected Date createDate;
	
	/**
	 * 更新者
	 */
    @Comment("更新者")
	protected SysUser lastUpdateBy;
	
	/**
	 * 更新日期
	 */
    @Comment("更新日期")
	protected Date lastUpdateDate;
	
	/**
	 * 删除标记（0：正常；1：删除；2：审核）
	 */
    @Comment("删除标记(0：正常；1：删除；2：审核)")
	@Length(min=1, max=1)
	protected String delFlag; 	
	
	public DataEntity() {
		super();
		this.delFlag = DEL_FLAG_NORMAL;
	}
	
	public DataEntity(String id) {
		super(id);
	}

	/**
	 * @return the remarks
	 */
	public String getRemarks() {
		return remarks;
	}

	/**
	 * @param remarks the remarks to set
	 */
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	/**
	 * @return the createBy
	 */
	public SysUser getCreateBy() {
		return createBy;
	}

	/**
	 * @param createBy the createBy to set
	 */
	public void setCreateBy(SysUser createBy) {
		this.createBy = createBy;
	}

	/**
	 * @return the createDate
	 */
	public Date getCreateDate() {
		return createDate;
	}

	/**
	 * @param createDate the createDate to set
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	/**
	 * @return the lastUpdateBy
	 */
	public SysUser getLastUpdateBy() {
		return lastUpdateBy;
	}

	/**
	 * @param lastUpdateBy the lastUpdateBy to set
	 */
	public void setLastUpdateBy(SysUser lastUpdateBy) {
		this.lastUpdateBy = lastUpdateBy;
	}

	/**
	 * @return the lastUpdateDate
	 */
	public Date getLastUpdateDate() {
		return lastUpdateDate;
	}

	/**
	 * @param lastUpdateDate the lastUpdateDate to set
	 */
	public void setLastUpdateDate(Date lastUpdateDate) {
		this.lastUpdateDate = lastUpdateDate;
	}
	
	/**
	 * @return the delFlag
	 */
	public String getDelFlag() {
		return delFlag;
	}

	/**
	 * @param delFlag the delFlag to set
	 */
	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

}
